package com.sy.job;

import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import java.util.Date;

//@Component
@Slf4j
public class TaskTest {

    @Scheduled(cron = "0/3 * * * * ?") //每50s钟执行一次
    public void teskTest(){
        log.info("开始执行了...");
        System.out.println("当前方法执行了..." + new Date());
    }
}
